/**
 * "@nuxtjs/i18n": "8.0.0-rc.3"
 * 
 * vue中使用：
 * <script setup>
    const { locale, setLocale } = useI18n()
    </script>

    <template>
      <div>
        <div>
          <button @click="setLocale('en')">en</button>
          <button @click="setLocale('fr')">fr</button>
          <p>{{ $t('welcome') }}</p>
        </div>
      </div>
    </template>
 */

import en from './lang/en.ts'
import cn from './lang/cn.ts'

//引入的不同语言文件
const messages = {
  en, cn
}

export default defineI18nConfig(() => ({
  legacy: false,
  locale: 'cn',
  messages     
}))
